package com.hxx.day8a.common;

import java.util.UUID;
import java.util.zip.CRC32;

/**
 * 工具类
 */
public class HxxUtils {
    private HxxUtils(){}

    /**
     * 获取文件名
     * @return
     */
    public static String fileName(){
        return UUID.randomUUID()
                .toString()
                .replace("-", "")+".properties";
    }

    /**
     * key值
     */
    public static long getKey(){
        CRC32 crc32 = new CRC32();
        crc32.update(UUID.randomUUID().toString().getBytes());
        return crc32.getValue();
    }
    public static long getKey1(){
        return System.currentTimeMillis();
    }

    public static void main(String[] args) {
        System.out.println(fileName());
    }
}


















